﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LstMember.ascx.cs" Inherits="Web.Cms.Member.LstMember" %>

<%@ Register src="../AjaxCP/Paging.ascx" tagname="PagingAjax" tagprefix="uc1" %>

<script type="text/javascript">
    $(function () {
        $("#<%=txtDatefrom.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
        $("#<%=txtDateTo.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
    });
</script>
<style type="text/css">
    .style1
    {
        text-align: right;
    }
</style>
<p>
     <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Member/CreateEditRegister.aspx','Thêm Mới Thành Viên',750,500,null,__doPostBack)">
        <img src="/App_Themes/Default/Images/Add_b.gif" border="0" /></a></p>
           

<div style="padding-bottom: 20px;" class="fl">
    <p class="heading" style="margin-left:400px; "> DANH SÁCH THÀNH VIÊN</p>          
</div>
<br />
<div style="clear:both;"><asp:Label Font-Bold="true" ForeColor="red" Font-Size="11px" ID="lblMessage" runat="server"></asp:Label></div>

<table width="800px" align="center" style="margin-left:250px">
    <tr>
        <td class="style1">
            <strong>Nhập email:</strong></td>
        <td>
            <asp:TextBox ID="txtKeysearch" runat="server" Height="20px" Width="200px"></asp:TextBox>
        </td>
        <td class="style1">
            <strong>Loại đăng ký:</strong></td>
        <td>
          
            <asp:DropDownList ID="dropType" runat="server">
                <asp:ListItem Value="0">---Lựa chọn---</asp:ListItem>
                <asp:ListItem Value="1">Miễn phí</asp:ListItem>
                <asp:ListItem Value="2">Thu phí</asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style1">
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style1">
            <strong>Từ ngày(yy/mm/dd):</strong></td>
        <td>
            <asp:TextBox ID="txtDatefrom" runat="server" Height="20px"></asp:TextBox>
            </td>
        <td class="style1">
            <strong>Đến ngày:</strong></td>
        <td>
            <asp:TextBox ID="txtDateTo" runat="server" Height="20px"></asp:TextBox>
            </td>
        <td>
            <asp:Button runat="server" ID="btnTimKiem" CssClass="Button_Search" 
                onclick="btnTimKiem_Click"/></td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
<asp:GridView ID="grdMember" runat="server" SkinID="AdminGridView" 
    BackColor="White" AutoGenerateColumns="False" 
    onrowcommand="grdMember_RowCommand" 
    onrowdatabound="grdMember_RowDataBound" EnableModelValidation="True">
    <Columns>               
         <asp:BoundField HeaderText="STT">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle />
        </asp:BoundField>  
        <asp:TemplateField HeaderText="Tên thành viên">
            <ItemStyle HorizontalAlign="Center" /> 
            <ItemTemplate>
                <%#Eval("FullName")%>
            </ItemTemplate>
        </asp:TemplateField> 
        <asp:BoundField HeaderText="Email" DataField="Email">            
        </asp:BoundField>            
        <asp:TemplateField  HeaderText="Địa chỉ">            
            <ItemTemplate><%#Eval("Address")%></ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="Ngày đăng ký" DataField="CreatedOn" 
             HeaderStyle-Width="130">
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle HorizontalAlign="center" />            
        </asp:BoundField>   
         <asp:TemplateField HeaderText="Số điện thoại">
           <ItemTemplate><%#Eval("PhoneNumber")%> </ItemTemplate>
         </asp:TemplateField>
         <asp:BoundField DataField="CMTND" HeaderText="CMTND" />
         <asp:BoundField DataField="IdMember" HeaderText="Mã thành viên" />
         <asp:BoundField DataField="CodeMemberParent" HeaderText="Mã người giới thiệu" />
         <asp:BoundField DataField="PriceMount" HeaderText="Số Gold" />
         <asp:BoundField DataField="GoldBonus" HeaderText="Tiền thưởng" />
        <asp:TemplateField HeaderText="Sửa" HeaderStyle-Width="20">
            <ItemTemplate>                                                
               <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Member/CreateEditRegister.aspx?IdMember=<%# Eval("IdMember") %>','Chỉnh Sửa Thông Tin Thành Viên',750,500,null,__doPostBack)">
                <img src="../../App_Themes/Default/Images/edit.gif" border="0"></a>
            </ItemTemplate>

        <HeaderStyle Width="20px"></HeaderStyle>
        </asp:TemplateField>  
        
         <asp:TemplateField HeaderText="Đổi mật khẩu">
             <ItemTemplate>
                <a style="cursor:hand;" href="javascript:void(0)" onclick="javascript:return showPopWinADMIN('/Cms/Member/ChangesPassword.aspx?IdMember=<%# Eval("IdMember") %>','Thay đổi Mật Khẩu Thành Viên',550,400,null,__doPostBack)">
                <img src="../../App_Themes/Default/Images/changePass.png" border="0"></a>
             </ItemTemplate>
         </asp:TemplateField>
        
        <asp:TemplateField HeaderText="Xem theo leve" Visible="false">
           <ItemTemplate><a href="Default.aspx?ctrlkey=LstLevelMember&id=<%#Eval("CodeMember") %>"> <img src="../../App_Themes/Default/Images/level.gif" border="0"></a> </ItemTemplate>
         </asp:TemplateField>
                             
        <asp:TemplateField HeaderText="Xóa" HeaderStyle-Width="20" Visible="false">
            <ItemTemplate>             
                <asp:Button ID="btnDelete" runat="server" CssClass="Icon_Delete" CommandArgument='<%# Eval("IdMember") %>' CommandName="Commanddelete" OnClientClick="return confirm('Bạn có chắc chắn xóa không ?')" />                   
            </ItemTemplate>

        <HeaderStyle Width="20px"></HeaderStyle>

        </asp:TemplateField>
    </Columns>
</asp:GridView>



<table cellspacing="0" cellpadding="0" border="0" width="100%">       
    <tr>
        <td align="center" style="height: 21px">
            <br />            
            <uc1:PagingAjax ID="PagingAjax1" runat="server" />            
            <br />
        </td>
    </tr>
</table>



